#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

void *MyThreadStrat(void *arg)
{
    int *i = (int*)arg;
    (void)arg;
    while(1)
    {
        printf("i am MyThreadStrat:%d\n",*i);
        sleep(1);
    }
    return NULL;
}

int main()
    ccuuu
    pthread_t tid;
    for(int i = 0;i < 2; i++ )
    {
        int ret = pthread_create(&tid,NULL,MyThreadStrat,(void*)&i);
        if(ret != 0)
         {
             perror("pthread_creat");
             return 0;
         }
    }

    while(1)
    {
        printf("i am main thread\n");
        sleep(1);
    }
    return 0;
}
